//年月日时间格式取得
function myformatter(date){  
    var y = date.getFullYear();  
    var m = date.getMonth()+1;  
    var d = date.getDate();
	var h = date.getHours();
	var mi = date.getMinutes();
    //return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d) + " " + (h<10?('0'+h):h)+ ":" + (mi<10?('0'+mi):mi);
	return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
}  
//转换时间格式
function myparser(s){  
    if (!s) return new Date();  
    var ss = (s.split('-'));  
    var y = parseInt(ss[0],10);  
    var m = parseInt(ss[1],10);  
    var d = parseInt(ss[2],10);
    if (!isNaN(y) && !isNaN(m) && !isNaN(d)){  
        return new Date(y,m-1,d);  
    } else {  
        return new Date();  
    } 
   // var d = parseInt((ss[2].split(' '))[0],10);
   //	var h = parseInt(((ss[2].split(' '))[1].split(':'))[0],10); 
   //var mi = parseInt(((ss[2].split(' '))[1].split(':'))[1],10); 
   // if (!isNaN(y) && !isNaN(m) && !isNaN(d) && !isNaN(h) && !isNaN(mi)){
   //return new Date(y,m-1,d,h,mi);  
}
//datagrid时间格式的format
//"yyyy-MM-dd hh:mm:ss.S" +"."+ss
function dgformatter(val,row){
	var date =  new Date(val);
    var y = date.getFullYear();  
    var m = date.getMonth()+1;  
    var d = date.getDate();
	var h = date.getHours();
	var mi = date.getMinutes();
	var s = date.getSeconds();
	var ss = date.getMilliseconds();
    return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d) + " " + (h<10?('0'+h):h)+ ":" + (mi<10?('0'+mi):mi)+ ":" + (s<10?('0'+s):s);  
}  

let HANGYUN = {

    REFRESH_INTERVAL:1, // default is 1 second
    DEMO:true,
    DEMO_DURATION:60	// minutes
}